package com.hmis.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 检查项目信息表
 *
 * @TableName check_item
 */
@TableName(value = "check_item")
@Data
public class CheckItem implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 检查项目编号
     */
    @TableId(value = "check_item_id", type = IdType.AUTO)
    private Long checkItemId;
    /**
     * 病人编号
     */
    @TableField(value = "patient_id")
    private Long patientId;
    /**
     * 病人姓名
     */
    @TableField(value = "patient_name")
    private String patientName;
    /**
     * 病房编号
     */
    @TableField(value = "ward_no")
    private Long wardNo;
    /**
     * 床位编号
     */
    @TableField(value = "bed_no")
    private Long bedNo;
    /**
     * 第几床
     */
    @TableField(value = "the_bed_no")
    private Long theBedNo;
    /**
     * 项目编号
     */
    @TableField(value = "item_id")
    private Long itemId;
    /**
     * 项目状态 0:完成，1:未完成
     */
    @TableField(value = "status")
    private Integer status;
    /**
     * 项目价格
     */
    @TableField(value = "price")
    private BigDecimal price;
    /**
     * 是否缴费 0:未缴费 1:已缴费
     */
    @TableField(value = "is_pay")
    private Integer isPay;
    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 修改时间
     */
    @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
    private Date modifyTime;
    /**
     * 是否删除
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CheckItem other = (CheckItem) that;
        return (this.getCheckItemId() == null ? other.getCheckItemId() == null : this.getCheckItemId().equals(other.getCheckItemId()))
                && (this.getPatientId() == null ? other.getPatientId() == null : this.getPatientId().equals(other.getPatientId()))
                && (this.getPatientName() == null ? other.getPatientName() == null : this.getPatientName().equals(other.getPatientName()))
                && (this.getWardNo() == null ? other.getWardNo() == null : this.getWardNo().equals(other.getWardNo()))
                && (this.getBedNo() == null ? other.getBedNo() == null : this.getBedNo().equals(other.getBedNo()))
                && (this.getTheBedNo() == null ? other.getTheBedNo() == null : this.getTheBedNo().equals(other.getTheBedNo()))
                && (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
                && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
                && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
                && (this.getIsPay() == null ? other.getIsPay() == null : this.getIsPay().equals(other.getIsPay()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getModifyTime() == null ? other.getModifyTime() == null : this.getModifyTime().equals(other.getModifyTime()))
                && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCheckItemId() == null) ? 0 : getCheckItemId().hashCode());
        result = prime * result + ((getPatientId() == null) ? 0 : getPatientId().hashCode());
        result = prime * result + ((getPatientName() == null) ? 0 : getPatientName().hashCode());
        result = prime * result + ((getWardNo() == null) ? 0 : getWardNo().hashCode());
        result = prime * result + ((getBedNo() == null) ? 0 : getBedNo().hashCode());
        result = prime * result + ((getTheBedNo() == null) ? 0 : getTheBedNo().hashCode());
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getIsPay() == null) ? 0 : getIsPay().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getModifyTime() == null) ? 0 : getModifyTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", checkItemId=").append(checkItemId);
        sb.append(", patientId=").append(patientId);
        sb.append(", patientName=").append(patientName);
        sb.append(", wardNo=").append(wardNo);
        sb.append(", bedNo=").append(bedNo);
        sb.append(", theBedNo=").append(theBedNo);
        sb.append(", itemId=").append(itemId);
        sb.append(", status=").append(status);
        sb.append(", price=").append(price);
        sb.append(", isPay=").append(isPay);
        sb.append(", createTime=").append(createTime);
        sb.append(", modifyTime=").append(modifyTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}